
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module write_docs</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>write_docs</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/jmatthews/Documents/Python/py_progs/write_docs.py">/Users/jmatthews/Documents/Python/py_progs/write_docs.py</a></font></td></tr></table>
    <p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Space&nbsp;Telescope&nbsp;Science&nbsp;Institute<br>
&nbsp;<br>
Synopsis:&nbsp;&nbsp;<br>
&nbsp;<br>
Find&nbsp;all&nbsp;of&nbsp;the&nbsp;python&nbsp;files&nbsp;in&nbsp;a&nbsp;directory&nbsp;and&nbsp;write&nbsp;out&nbsp;html<br>
pydoc&nbsp;documentation&nbsp;of&nbsp;them&nbsp;in&nbsp;the&nbsp;current&nbsp;working&nbsp;directory<br>
&nbsp;<br>
&nbsp;<br>
Command&nbsp;line&nbsp;usage&nbsp;(if&nbsp;any):<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write_docs.py&nbsp;directory_name&nbsp;[folder_to_save_subhtml]<br>
&nbsp;<br>
Description:&nbsp;&nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;routine&nbsp;finds&nbsp;all&nbsp;of&nbsp;the&nbsp;.py&nbsp;files&nbsp;in&nbsp;the&nbsp;named&nbsp;directory&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generates&nbsp;a&nbsp;shell&nbsp;script&nbsp;which&nbsp;runs&nbsp;pydocs&nbsp;to&nbsp;create&nbsp;html&nbsp;help<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files&nbsp;for&nbsp;each&nbsp;.py&nbsp;file.&nbsp;&nbsp;It&nbsp;then&nbsp;creates&nbsp;a&nbsp;another&nbsp;html&nbsp;file<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with&nbsp;the&nbsp;rootname&nbsp;of&nbsp;each&nbsp;of&nbsp;the&nbsp;individual&nbsp;files.<br>
&nbsp;<br>
Primary&nbsp;routines:<br>
&nbsp;<br>
Notes:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;you&nbsp;want&nbsp;to&nbsp;get&nbsp;an&nbsp;html&nbsp;help&nbsp;for&nbsp;a&nbsp;specfic&nbsp;package&nbsp;the&nbsp;python<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command&nbsp;is&nbsp;simply<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pydocs&nbsp;package_name<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;help&nbsp;html&nbsp;files&nbsp;have&nbsp;links&nbsp;to&nbsp;the&nbsp;packages&nbsp;such&nbsp;as&nbsp;pyfits<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but&nbsp;these&nbsp;are&nbsp;incorrect&nbsp;because&nbsp;pydocs&nbsp;assumes&nbsp;all&nbsp;the&nbsp;help<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files&nbsp;are&nbsp;in&nbsp;the&nbsp;current&nbsp;working&nbsp;directory,&nbsp;which&nbsp;they&nbsp;are&nbsp;likely<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;does&nbsp;not&nbsp;delete&nbsp;help&nbsp;fro&nbsp;routines&nbsp;that&nbsp;have&nbsp;been&nbsp;deleted,&nbsp;which&nbsp;is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;problem.&nbsp;&nbsp;One&nbsp;could&nbsp;fix&nbsp;this,&nbsp;but&nbsp;one&nbsp;would&nbsp;then&nbsp;need&nbsp;to&nbsp;keep&nbsp;some<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kind&nbsp;of&nbsp;database&nbsp;so&nbsp;that&nbsp;you&nbsp;knew&nbsp;what&nbsp;files&nbsp;should&nbsp;exist.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
History:<br>
&nbsp;<br>
100805&nbsp;ksl&nbsp;Coding&nbsp;begun<br>
1405&nbsp;&nbsp;&nbsp;JM&nbsp;customised&nbsp;scripts&nbsp;for&nbsp;use&nbsp;with&nbsp;py_progs</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="glob.html">glob</a><br>
</td><td width="25%" valign=top><a href="markup.html">markup</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-make_toplevel"><strong>make_toplevel</strong></a>(dirname, names, index_name<font color="#909090">=None</font>, subdir<font color="#909090">='.'</font>)</dt><dd><tt>Create&nbsp;an&nbsp;html&nbsp;page&nbsp;to&nbsp;point&nbsp;to&nbsp;all<br>
of&nbsp;the&nbsp;individual&nbsp;help&nbsp;pages&nbsp;that&nbsp;have<br>
been&nbsp;made</tt></dd></dl>
 <dl><dt><a name="-write_docs"><strong>write_docs</strong></a>(dirname<font color="#909090">='../persistence'</font>, index_name<font color="#909090">=None</font>, subdir<font color="#909090">='.'</font>, names<font color="#909090">=None</font>)</dt><dd><tt>Locate&nbsp;all&nbsp;of&nbsp;the&nbsp;.py&nbsp;files&nbsp;in&nbsp;dirname&nbsp;and<br>
write&nbsp;out&nbsp;help&nbsp;in&nbsp;the&nbsp;current&nbsp;working&nbsp;directory<br>
using&nbsp;pydocs</tt></dd></dl>
</td></tr></table>
</body></html>